void onAffichage()
{

     int Beat_CompteurCaisse;
	int Beat_CompteurEnt;
	int Beat_Compteursnip;
  

  

  
  
  
  	  
	  	for(Beat_CompteurCaisse=0; Beat_CompteurCaisse<Beat_NBCAISSE; Beat_CompteurCaisse++)
      {
	  if (Beat_EtatCaisse[Beat_CompteurCaisse]=0) Tblit(Beat_CaisseX[Beat_CompteurCaisse]-xwin, Beat_CaisseY[Beat_CompteurCaisse]-ywin, Beat_Caisse1, screen);
	  if (Beat_EtatCaisse[Beat_CompteurCaisse]>0&&Beat_EtatCaisse[Beat_CompteurCaisse]<15) Tblit(Beat_CaisseX[Beat_CompteurCaisse]-xwin, Beat_CaisseY[Beat_CompteurCaisse]-ywin, Beat_Caisse2, screen);
	  if (Beat_EtatCaisse[Beat_CompteurCaisse]>14&&Beat_EtatCaisse[Beat_CompteurCaisse]<30) Tblit(Beat_CaisseX[Beat_CompteurCaisse]-xwin, Beat_CaisseY[Beat_CompteurCaisse]-ywin, Beat_Caisse3, screen);
	  if (Beat_EtatCaisse[Beat_CompteurCaisse]>29&&Beat_EtatCaisse[Beat_CompteurCaisse]<45) Tblit(Beat_CaisseX[Beat_CompteurCaisse]-xwin, Beat_CaisseY[Beat_CompteurCaisse]+40-ywin, Beat_Caisse4, screen);
	  if (Beat_EtatCaisse[Beat_CompteurCaisse]>44) Tblit(Beat_CaisseX[Beat_CompteurCaisse]-xwin, Beat_CaisseY[Beat_CompteurCaisse]+40-ywin, Beat_Caisse5, screen);
	  if (HealthBeat[Beat_CompteurCaisse]=1)  Tblit(Beat_CaisseX[Beat_CompteurCaisse]-xwin+32, Beat_CaisseY[Beat_CompteurCaisse]+16-ywin, Soinbeat, screen);
	  }
  
  
  	for(Beat_Compteursnip=Beat_NBMOB; Beat_Compteursnip<Beat_NBSNIP; Beat_Compteursnip++)
    {
	if (Beat_LifeIA[Beat_CompteurSnip]>0)
	{
	
      if (Entity.X[Beat_CompteurSnip]-Entity.X[Personnage]>349) tblit(Entity.x[Beat_CompteurSnip]-20-xwin,Entity.Y[Beat_CompteurSnip]-30-ywin, Beat_narmolsnip, screen);
	  
      if (Beat_CompteurSH[Beat_CompteurSnip]>0&&Beat_CompteurSH[Beat_CompteurSnip]<50) Tblit(Entity.x[Beat_CompteurSnip]-20-xwin,Entity.Y[Beat_Compteursnip]-30-ywin,Beat_Snipsh3 , screen);
	  if (Beat_CompteurSH[Beat_CompteurSnip]>90&&Beat_CompteurSH[Beat_CompteurSnip]<100) Tblit(Entity.x[Beat_CompteurSnip]-126-xwin,Entity.Y[Beat_Compteursnip]-10-ywin,Beat_Shfire , screen);
	  
	  
      if (Beat_CompteurSH[Beat_CompteurSnip]>49&&Beat_CompteurSH[Beat_CompteurSnip]<100) Tblit(Entity.x[Beat_CompteurSnip]-20-xwin,Entity.Y[Beat_Compteursnip]-30-ywin,Beat_Snipsh2 , screen);
      if (Beat_CompteurSH[Beat_CompteurSnip]>99) Tblit(Entity.x[Beat_CompteurSnip]-20-xwin,Entity.Y[Beat_Compteursnip]-30-ywin,Beat_Snipsh3 , screen);
	  
	  if (Entity.X[Personnage]>Entity.X[Beat_Compteursnip]-25&&Beat_Fuitesnip<21)  Tblit(Entity.x[Beat_CompteurSnip]-20-xwin,Entity.Y[Beat_Compteursnip]-30-ywin,Beat_Snipsh1d, screen);
	  if (Entity.X[Personnage]>Entity.X[Beat_Compteursnip]-25&&Beat_Fuitesnip>20)  Tblit(Entity.x[Beat_CompteurSnip]-20-xwin,Entity.Y[Beat_Compteursnip]-30-ywin,Beat_narmolsnipD screen);
	  
	}
	

	
    }
	
  for(Beat_CompteurEnt=0; Beat_CompteurEnt<Beat_NBMOB-1; Beat_Compteurent++)
    {
		if (Beat_LifeIA[Beat_CompteurEnt]>0)
	{
	if(Entity.X[Personnage]<=Entity.X[Beat_CompteurEnt])
	{
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<20) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_MANQ, screen);  
    if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<40&&Beat_CompteurImaCac[Beat_CompteurEnt]>19) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac, screen);  
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<60&&Beat_CompteurImaCac[Beat_CompteurEnt]>39) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_MANQ, screen);
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<80&&Beat_CompteurImaCac[Beat_CompteurEnt]>59) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac, screen);
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<100&&Beat_CompteurImaCac[Beat_CompteurEnt]>79) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_MANQ, screen);
	If(Beat_SWORDSH[Beat_CompteurEnt]>0&&Beat_SWORDSH[Beat_CompteurEnt]<30) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac2, screen);
	If(Beat_SWORDSH[Beat_CompteurEnt]>29&&Beat_SWORDSH[Beat_CompteurEnt]<60) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac3, screen);
	If(Beat_SWORDSH[Beat_CompteurEnt]>59) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac, screen);
	 }
	 	if(Entity.X[Personnage]>Entity.X[Beat_CompteurEnt])
	{
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<20) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_MANQ2, screen);  
    if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<40&&Beat_CompteurImaCac[Beat_CompteurEnt]>19) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_CacD, screen);  
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<60&&Beat_CompteurImaCac[Beat_CompteurEnt]>39) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_MANQ2, screen);
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<80&&Beat_CompteurImaCac[Beat_CompteurEnt]>59) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_CacD, screen);
	if(Beat_SWORDSH[Beat_CompteurEnt]=0&&Beat_CompteurImaCac[Beat_CompteurEnt]<100&&Beat_CompteurImaCac[Beat_CompteurEnt]>79) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_MANQ2, screen);
	If(Beat_SWORDSH[Beat_CompteurEnt]>0&&Beat_SWORDSH[Beat_CompteurEnt]<30) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac2D, screen);
	If(Beat_SWORDSH[Beat_CompteurEnt]>29&&Beat_SWORDSH[Beat_CompteurEnt]<60) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_Cac3D, screen);
	If(Beat_SWORDSH[Beat_CompteurEnt]>59) Tblit(Entity.x[Beat_CompteurEnt]-xwin,Entity.Y[Beat_CompteurEnt]-80-ywin, Beat_CacD, screen);
	 }
	 
	 
	 
	  }
    }
	
	
	
	
	  

	  

	  
	  
	  
	  
	 if (Beat_CompteurMove=0&&Beat_CompteurKick<1&&Beat_Moveright=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMove2, screen);
	 if (Beat_CompteurMove>0&&Beat_CompteurMove<21&&Beat_CompteurKick<1&&Beat_Moveright=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMove1, screen);
	 if (Beat_CompteurMove>20&&Beat_CompteurMove<41&&Beat_CompteurKick<1&&Beat_Moveright=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMove2, screen);
	 if (Beat_CompteurMove>40&&Beat_CompteurKick<1&&Beat_Moveright=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMove3, screen);
	 if (Beat_Compteurkick>0&&Beat_CompteurKick<11&&Beat_Moveright=1&&Beat_Lifeplayer>0&&Beat_Persochoice=1) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoShoot2, screen);
	 if (Beat_Compteurkick>0&&Beat_CompteurKick<21&&Beat_Moveright=1&&Beat_Lifeplayer>0&&Beat_Persochoice=2) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_Shootch2, screen);
	 if (Beat_Compteurkick>10&&Beat_CompteurKick<21&&Beat_Moveright=1&&Beat_Lifeplayer>0&&Beat_Persochoice=1) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoShoot1, screen);
	 
	 if (Beat_CompteurMove=0&&Beat_CompteurKick<1&&Beat_Moveleft=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]+22-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMoveL2, screen);
	 if (Beat_CompteurMove>0&&Beat_CompteurMove<21&&Beat_CompteurKick<1&&Beat_Moveleft=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMoveL1, screen);
	 if (Beat_CompteurMove>20&&Beat_CompteurMove<41&&Beat_CompteurKick<1&&Beat_Moveleft=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]+22-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMoveL2, screen);
	 if (Beat_CompteurMove>40&&Beat_CompteurKick<1&&Beat_Moveleft=1&&Beat_Lifeplayer>0) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoMoveL3, screen);
	 if (Beat_Compteurkick>0&&Beat_CompteurKick<11&&Beat_Moveleft=1&&Beat_Lifeplayer>0&&Beat_Persochoice=1) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoShootL2, screen);
	 if (Beat_Compteurkick>0&&Beat_CompteurKick<21&&Beat_Moveleft=1&&Beat_Lifeplayer>0&&Beat_Persochoice=2) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_ShootChG2, screen);
	 if (Beat_Compteurkick>10&&Beat_CompteurKick<21&&Beat_Moveleft=1&&Beat_Lifeplayer>0&&Beat_Persochoice=1) Tblit(Entity.X[Personnage]-xwin,Entity.Y[Personnage]-60-ywin, Beat_PersoShootL1, screen);
	 
	 if (Beat_Compteurkick>0&&Beat_CompteurKick<11&&Beat_Moveright=1&&Beat_DegatSS>0&&Beat_Lifeplayer>0&&Beat_Persochoice=1) Tblit(Entity.X[Personnage]+40-xwin,Entity.Y[Personnage]-60-ywin, Beat_Shootpsf, screen);
	 if (Beat_Compteurkick>0&&Beat_CompteurKick<11&&Beat_Moveright=0&&Beat_DegatSS>0&&Beat_Lifeplayer>0&&Beat_Persochoice=1) Tblit(Entity.X[Personnage]-10-xwin,Entity.Y[Personnage]-60-ywin, Beat_Shootpsf2, screen);
	 
	 

	
	 if (Beat_Compteurkick>5&&Beat_CompteurKick<21&&Beat_Moveright=1&&Beat_Lifeplayer>0&&Beat_Persochoice=2) Tscaleblit(Entity.X[Personnage]+49-xwin,Entity.Y[Personnage]-50-ywin, Beat_Multipli, ImageHeight(Beat_Shoot2), Beat_Shoot2, screen);

	 
	 if (Beat_Compteurkick>5&&Beat_CompteurKick<21&&Beat_Moveright=0&&Beat_Lifeplayer>0&&Beat_Persochoice=2) Tscaleblit(Entity.X[Personnage]-Beat_Multipli+1-xwin,Entity.Y[Personnage]-50-ywin, Beat_Multipli, ImageHeight(Beat_Shoot2g), Beat_Shoot2g, screen);
	 
     if (Beat_Lifeplayer<1) Tblit(Entity.X[Personnage]+40-xwin,Entity.Y[Personnage]-ywin, Beat_Mortperso, screen);
	  
	  
	  
	  
	  
	  
	  Tblit (0-xwin, 0-ywin, Beat_Barre, screen);
	  
	  
	if (Beat_LifePlayer > 27) Tblit(0,0, Beat_hud1, screen);
	if (Beat_LifePlayer > 24 && Beat_LifePlayer < 28 ) Tblit(0,0, Beat_hud2, screen);
	if (Beat_LifePlayer > 22 && Beat_LifePlayer < 25) Tblit(0,0, Beat_hud3, screen);
	if (Beat_LifePlayer > 17 && Beat_LifePlayer < 23) Tblit(0,0, Beat_hud4, screen);
	if (Beat_LifePlayer > 14 && Beat_LifePlayer < 18) Tblit(0,0, Beat_hud5, screen);
	if (Beat_LifePlayer > 11 && Beat_LifePlayer < 15) Tblit(0,0, Beat_hud6, screen);
	if (Beat_LifePlayer > 7 && Beat_LifePlayer < 12) Tblit(0,0, Beat_hud7, screen);
	if (Beat_LifePlayer > 4 && Beat_LifePlayer < 8) Tblit(0,0, Beat_hud8, screen);
	if (Beat_LifePlayer > 0 && Beat_LifePlayer < 5) Tblit(0,0, Beat_hud9, screen);
	if (Beat_LifePlayer =0) Tblit(0,0, Beat_hud10, screen);
	
	if (Beat_CompteurGameOver > 0 &&Beat_CompteurGameOver < 51) Tblit(0,0, Beat_hud12, screen);
	
	if (Beat_CompteurGameOver > 25&&Beat_CompteurGameOver < 51) Tblit(0,0, Beat_hud13, screen);
	if (Beat_CompteurGameOver > 50&&Beat_CompteurGameOver < 76) Tblit(0,0, Beat_hud14, screen);
	if (Beat_CompteurGameOver > 75&&Beat_CompteurGameOver < 101) Tblit(0,0, Beat_hud15, screen);
	if (Beat_CompteurGameOver > 100&&Beat_CompteurGameOver < 126) Tblit(0,0, Beat_hud16, screen);
	if (Beat_CompteurGameOver > 125&&Beat_CompteurGameOver < 151) Tblit(0,0, Beat_hud17, screen);
	if (Beat_CompteurGameOver > 150) Tblit(0,0, Beat_hud11, screen);
	Tblitlucent(0,0,70, Beat_ombre, screen);
	
	if (Beat_CompteurGameOver > 0 &&Beat_compthud<11) Tblit(70,200, Beat_hudG1, screen);
	else if (Beat_CompteurGameOver > 0 &&Beat_compthud<21) Tblit(70,200, Beat_hudG2, screen);
	else if (Beat_CompteurGameOver > 0 &&Beat_compthud<31) Tblit(70,200, Beat_hudG3, screen);	
	
	if (Beat_CompteurGameOver > 50 &&Beat_compthud<11) Tblit(135,200, Beat_huda1, screen);
	else if (Beat_CompteurGameOver > 50 &&Beat_compthud<21) Tblit(135,200, Beat_huda2, screen);
	else if (Beat_CompteurGameOver > 50 &&Beat_compthud<31) Tblit(135 200, Beat_huda3, screen);	
	
	if (Beat_CompteurGameOver > 100) Tblit(199 200, Beat_hudm1, screen);
	
	if (Beat_CompteurGameOver > 150) Tblit(283 200, Beat_hude1, screen);
	
	if (Beat_CompteurGameOver > 200 && Beat_compthud<11) Tblit(352 200, Beat_hudo1, screen);
	else if (Beat_CompteurGameOver > 200 && Beat_compthud<21) Tblit(352 200, Beat_hudo2, screen);
	else if (Beat_CompteurGameOver > 200 && Beat_compthud<31) Tblit(352 200, Beat_hudo3, screen);	
	
	if (Beat_CompteurGameOver > 200) Tblit(417 200, Beat_hudv1, screen);
	
	if (Beat_CompteurGameOver > 200) Tblit(482 200, Beat_hude1, screen);	
	
	if (Beat_CompteurGameOver > 200) Tblit(547 200, Beat_hudr1, screen);
	
	
	
	
	if (Beat_CompteurFluide > -1 && Beat_CompteurFluide < 20) Tblit(0,0, Beat_Fluide1, screen);
	if (Beat_CompteurFluide > 19 && Beat_CompteurFluide < 40) Tblit(0,0, Beat_Fluide2, screen);
	if (Beat_CompteurFluide > 39 && Beat_CompteurFluide < 60) Tblit(0,0, Beat_Fluide3, screen);
}














int Beat_HUD11=LoadImage("ImageBeat/frame HUD/hudmort.png");
int Beat_HUD12=LoadImage("ImageBeat/frame HUD/gameover1.png");
int Beat_HUD13=LoadImage("ImageBeat/frame HUD/gameover2.png");
int Beat_HUD14=LoadImage("ImageBeat/frame HUD/gameover3.png");
int Beat_HUD15=LoadImage("ImageBeat/frame HUD/gameover4.png");
int Beat_HUD16=LoadImage("ImageBeat/frame HUD/gameover5.png");
int Beat_HUD17=LoadImage("ImageBeat/frame HUD/gameover6.png");

int Beat_ombre=LoadImage("ImageBeat/frame HUD/ombre.png");



















